package com.wtwd.campus.jdzc.service.impl;

import com.wtwd.campus.entity.Alarm;
import com.wtwd.campus.jdzc.dao.JdzcDeviceAlarmMapper;
import com.wtwd.campus.jdzc.service.JdzcDeviceAlarmService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class JdzcDeviceAlarmServiceImpl implements JdzcDeviceAlarmService {

    @Autowired
    private JdzcDeviceAlarmMapper deviceAlarmMapper;
    @Override
    public List<Alarm> getAlarmListByDeviceId(Integer deviceId) {
        return deviceAlarmMapper.getAlarmListByDeviceId(deviceId);
    }

    @Override
    public int closeAlarmById(Integer id,Integer flag) {
        return deviceAlarmMapper.closeAlarmById(id, flag);
    }

    @Override
    public Alarm queryAlarmById(Integer id) {
        return deviceAlarmMapper.queryAlarmById(id);
    }

    @Override
    public int modifyAlarm(Alarm alarm) {
        return deviceAlarmMapper.modifyAlarm(alarm);
    }

    @Override
    public int addAlarm(Alarm alarm) {
        return deviceAlarmMapper.addAlarm(alarm);
    }

    @Override
    public int modifyAlarmMess(Alarm alarm) {
        return deviceAlarmMapper.modifyAlarmMess(alarm);
    }

    @Override
    public int modifyStatusByDeviceIdAndSeq(Integer status, Integer deviceId, Integer seq) {
        return deviceAlarmMapper.modifyStatusByDeviceIdAndSeq(status, deviceId, seq);
    }

    @Override
    public Alarm getAlarmByDeviceIdAndSeq(Integer deviceId, Integer seq) {
        return deviceAlarmMapper.getAlarmByDeviceIdAndSeq(deviceId, seq);
    }

    @Override
    public int deleteAlarmByDeviceIdAndSeq(Integer deviceId, Integer seq) {
        return deviceAlarmMapper.deleteAlarmByDeviceIdAndSeq(deviceId, seq);
    }
}
